//-----------------------------------------------------------------------------
// Scene_Menu
//
// 重定义菜单界面的类。


Scene_MenuBase.prototype.create = function() {
    Scene_Base.prototype.create.call(this);
    this.createBackground();
	//this.drawMenuBackground();
    this.updateActor();
    this.createWindowLayer();

};

Scene_Menu.prototype.createStatusWindow = function() {
	this._statusWindow = new Window_MenuStatus(0, 0, '-',true);
	this._statusWindow.x = (Graphics.boxWidth - 660)/2;			//居中
	this._statusWindow.y = Graphics.boxHeight - 265;
    //this._statusWindow.reserveFaceImages();
    this._statusWindow.reservePortraitImages();
    this.addChild(this._statusWindow);
};

Scene_Menu.prototype.createGoldWindow = function() {
    //this._goldWindow = new Window_Gold(977, 39, 240, 200);
	this._goldWindow = new Window_Gold(0, 0);
	this._goldWindow.x = Graphics.boxWidth - this._goldWindow.width - 64;
	this._goldWindow.y = 40;
	
    this.addWindow(this._goldWindow);
    
};


// 菜单命令窗口
Scene_Menu.prototype.createCommandWindow = function() {
    this._commandWindow = new SWDA_Window_MenuCommand(0, 0);
    this._commandWindow.setHandler('item',      this.commandItemCommand.bind(this));
    this._commandWindow.setHandler('skill',     this.commandSkillCommand.bind(this));
    this._commandWindow.setHandler('status',    this.commandPersonal.bind(this));
    this._commandWindow.setHandler('tianshu',   this.commandSystemCommand.bind(this));
    this._commandWindow.setHandler('cancel',    this.popScene.bind(this));
    this.addWindow(this._commandWindow);
    
};

//奇术命令窗口
Scene_Menu.prototype.commandSkillCommand = function() {
    SceneManager.push(Scene_SkillCommand);
    if(!ConfigManager.commandRemember)
        SWDA_Window_SkillMenuCommand._lastCommandSymbol = null;
};

//物品命令窗口
Scene_Menu.prototype.commandItemCommand = function() {
    SceneManager.push(Scene_ItemCommand);
    if(!ConfigManager.commandRemember)
        SWDA_Window_ItemMenuCommand._lastCommandSymbol = null;
};

//天书命令窗口
Scene_Menu.prototype.commandSystemCommand = function() {
    SceneManager.push(Scene_SystemCommand);
    if(!ConfigManager.commandRemember)
        SWDA_Window_SystemMenuCommand._lastCommandSymbol = null;
};